package site.kitcheng.springboottest.api.controller;


import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import site.kitcheng.springboottest.api.controller.dto.UserDto;
import site.kitcheng.springboottest.app.service.ISysProfileService;
import site.kitcheng.springboottest.app.service.ISysUserService;
import site.kitcheng.springboottest.domain.SysUser;
import site.kitcheng.springboottest.infra.utils.Result;

/**
 * <p>
 * 用户 前端控制器
 * </p>
 *
 * @author author
 * @since 2025-01-22
 */
@RestController
@RequestMapping("/sys-user")
public class SysUserController {

    @Autowired
    private ISysUserService sysUserService;


    @PostMapping("/login")
    public String login(@RequestBody UserDto userDto) {
        return sysUserService.login(userDto);
    }




    @PostMapping("/register")
    public Result registerUser(@RequestBody SysUser sysUser) {

       return null;
    }



}
